<form action="{{action}}" id="curve_grade_dialog" style="display: none;" title="{{#t "curve_grade_for_assignment"}}Curve Grade for {{assignment.name}}{{/t}}">
  <input type="hidden" name="_method" value="POST"/>
  <input type="hidden" name="assignment_id" class="assignment_id" value="{{assignment.id}}" />
  <p id="curved_grades_description">
    {{#t "curve_average"}}
      Enter an average grade for the curve for <b>{{assignment.name}}</b>. The chart shows a best attempt at curving the grades based on current student scores.
    {{/t}}
  </p>
  <div style="min-height: 100px;">
    <table cellpadding="0" cellspacing="0">
      <tr id="results_list"></tr>
      <tr id="results_values"></tr>
    </table>
  </div>
  <p style="text-align: center;">
    {{#t "average_score"}}Average Score{{/t}}
    <input type="text" min="0" name="middle_score" id="middle_score"
           style="width: 45px;" value="{{middleScore}}"
           aria-labelledby="curved_grades_points_possible"
           aria-describedby="curved_grades_description" />
    <label for="middle_score" id="curved_grades_points_possible">
    {{#if showOutOf}}
      {{#t}}
        out of {{formattedOutOf}}
      {{/t}}
    {{/if}}
    </label>
  </p>
  <p>
    {{checkbox "assign_blanks"}}
    <label for="assign_blanks">{{#t "labels.assign_blanks"}}Assign zeroes to unsubmitted students{{/t}}</label>
  </p>
  <div class="alert alert-danger">
    <p>
      {{#t "this_is_permanent"}}
      Grade curving cannot be undone. Pre-curved grade histories will be available, but the curving action is irreversible.
      {{/t}}
    </p>
  </div>
  <button data-text-while-loading="{{#t "buttons.curving_grades"}}Curving Grades...{{/t}}" type="submit" class="btn btn-primary">
    {{#t "buttons.curve_grades"}}Curve Grades{{/t}}
  </button>
</form>
